package com.tencent.ied.bk.entity;

import cn.hutool.json.JSONUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.concurrent.atomic.AtomicInteger;


/**
 * @author yu_chen
 * @date 2021年03月10日00:51:48
 * <p>
 * 摘要信息类
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class SearchAbstractInfo extends BaseAbstractInfo {

    /**
     * 搜索关键词 在当前摘要中中出现的次数
     */
    private Integer searchKeyWordCountInContent;
    /**
     * 搜索包含关键词 在当前摘要中中出现的次数
     */
    private Integer searchContainsKeyWordCountInContent;


    public SearchAbstractInfo(BaseAbstractInfo baseAbstractInfo) {
        super(baseAbstractInfo.getId(), baseAbstractInfo.getContent(), baseAbstractInfo.getWords(), baseAbstractInfo.getSearchCount());
    }

    @Override
    public String toString() {
        return super.toString() + " {" +
                "searchKeyWordCountInContent=" + searchKeyWordCountInContent +
                ", searchContainsKeyWordCountInContent=" + searchContainsKeyWordCountInContent +
                "} ";
    }
}
